package com.toggery.POS.dao;

import com.toggery.POS.entity.Inventory;
import com.toggery.POS.entity.InventoryExample;
import java.util.List;

import com.toggery.POS.entity.InventoryRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface InventoryMapper {
    long countByExample(InventoryExample example);

    int deleteByExample(InventoryExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Inventory record);

    int insertSelective(Inventory record);

    List<InventoryRecord> countByclothing();

    List<InventoryRecord> queryForList();

    List<Inventory> selectByExample(InventoryExample example);

    Inventory selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Inventory record, @Param("example") InventoryExample example);

    int updateByExample(@Param("record") Inventory record, @Param("example") InventoryExample example);

    int updateByPrimaryKeySelective(Inventory record);

    int updateByPrimaryKey(Inventory record);
    @Select({
            "SELECT id,clothingid,clothingname,number,type,creattime from inventory"
    })
    List<Inventory> findAll();
    @Select({
            "SELECT id,clothingid,clothingname,number,type,creattime from inventory WHere clothingId=#{clothingid,jdbcType=INTEGER}"
    })
    List<Inventory> findAllWithClothing(Integer clothingid);
}